package com.ruoyi.web.controller.homePage;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;

import com.ruoyi.system.service.IHomePageService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/homePage/homePage")
public class HomePageController extends BaseController {

    @Autowired
    private IHomePageService homePageService;

    /**
     * 商城代发货订单
     */
    @GetMapping("/countToSendProductNum")
    public AjaxResult countToSendProductNum()
    {
        int num = homePageService.countToSendProductNum();
        return AjaxResult.success(num);
    }
    /**
     * 退款中订单
     */
    @GetMapping("/orderInRefund")
    public AjaxResult orderInRefund()
    {
       int num = homePageService.orderInRefund();
        return  AjaxResult.success(num);
    }

    /**
     * 上架商品
     */
    @GetMapping("/goodsShelves")
    public AjaxResult goodsShelves()
    {
        int num = homePageService.goodsShelves();
        return  AjaxResult.success(num);
    }


    /**
     * 待审核入住商家
     */
    @GetMapping("/merchantsToBeAudited")
    public AjaxResult merchantsToBeAudited()
    {
        int num = homePageService.merchantsToBeAudited();
        return  AjaxResult.success(num);

    }

    /**
     * 门店数量
     */
    @GetMapping("/numberOfStores")
    public AjaxResult numberOfStores()
    {
        int num = homePageService.numberOfStores();
        return  AjaxResult.success(num);
    }



}
